/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.herenit.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "d_user")
public class User implements Serializable {

    @TableGenerator(name = "ID_GENERATOR",
    table = "ID_GENERATOR",
    pkColumnName = "PKCOLUMN",
    valueColumnName = "VALUECOLUMN",
    pkColumnValue = "USER_ID",
    initialValue = 999)
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "ID_GENERATOR")
    private long id;
    @Column
    private String name;
    @Column
    private String password;
    @Column
    private String email;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "User{" + "id=" + id + ", name=" + name + ", password=" + password + ", email=" + email + '}';
    }
}
